package com.leoman.spinningmachine;


import android.util.Log;

import com.leoman.helper.BaseApplication;
import com.leoman.helper.HelperLibrary;
import com.leoman.helper.util.RefreshUtil;
import com.leoman.spinningmachine.constant.Urls;
import com.spurs.retrofit.RetrofitSdk;

import cn.jpush.android.api.JPushInterface;

/**
 * Created by Administrator on 2018/4/24.
 * app
 */

public class App extends BaseApplication {
    static App instance;

    @Override
    public void onCreate() {
        super.onCreate();
        instance = this;
        HelperLibrary.getInstance().setThemeColor(R.color.black); //主题色
        HelperLibrary.getInstance().setImageUrl(Urls.IMAGE_URL); //图片域名
        RefreshUtil.getInstance().init(R.mipmap.ic_launcher, R.color.main_color);  //初始化刷新
        RetrofitSdk.getInstance().setBaseUrl(Urls.BASE_URL, 5);

        JPushInterface.setDebugMode(true);
        JPushInterface.init(this);

        String registrationID = JPushInterface.getRegistrationID(this);

        Log.e("registrationID", registrationID);



    }



    public static App getInstance() {
        return instance;
    }
}
